package com.blb.community.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.community.entity.SysLogininfor;
import com.blb.community.mapper.SysLogininforMapper;
import com.blb.community.service.ISysLogininforService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 系统访问记录 服务实现类
 * </p>
 *
 * @author 帅帅
 * @since 2022-07-02
 */
@Service
public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, SysLogininfor> implements ISysLogininforService {

    @Autowired
    private  SysLogininforMapper sysLogininforMapper;

    @Override
    public IPage<SysLogininfor> getAllLogininfor(Long current, Long size) {
        return sysLogininforMapper.getAllLogininfor(new Page<>(current,size));
    }

    @Override
    public List<SysLogininfor> selectLogininfor(Long id) {
        return sysLogininforMapper.selectLogininfor(id);
    }

    @Override
    public IPage<SysLogininfor> getLogininfor(Long current, Long size,String userName, String ipaddr,String status, String beginTime, String endTime) {
        return sysLogininforMapper.getLogininfor(new Page<>(current,size),userName,ipaddr,status,beginTime,endTime);
    }
}
